#include<iostream>
#include<set>
#include<string>
using namespace std;

set<string> adict;
int main(void) {
	int n;
	cin >> n;
	string name;
	for(int i = 0; i < n; i++) {
		cin >> name;
		adict.insert(name);
	}
	cout << adict.size() << endl;
	for(set<string>::iterator it = adict.begin(); it != adict.end(); it++) {
		cout << (*it) << endl;
	}
	return 0;
}
